import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/home/home.vue'
import TabBar from '../components/TabBar.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    components:{
       default:Home,
       footer:TabBar
    } 
  },
  {
    path: '/newThings',
    name: 'newThings',
    components:{
      default:() => import('../views/newThings/newThings.vue'),
       footer:TabBar
    } 
  },
   {
    path: '/find',
    name: 'find',
      components:{
      default:() => import('../views/find/find.vue'),
       footer:TabBar
    } 
  },
   {
    path: '/cart',
    name: 'cart',
    components:{
      default:() => import('../views/cart/cart.vue'),
       footer:TabBar
    } 
  },
   {
    path: '/user',
    name: 'user',
    components:{
      default:() => import('../views/user/user.vue'),
       footer:TabBar
    } 
  },
   {
    path: '/kind',
    name: 'kind',
    component:() => import('../views/kind/kind.vue'),
   
    
  },
   {
    path: '/login',
    name: 'login',
    component:() => import('../views/login/login.vue'),
   
    
  },
   {
    path: '/search',
    name: 'search',
    component:() => import('../views/search/search.vue'),
   
    
  },
   {
    path: '/detail/:id',
    name: 'detail',
    component:() => import('../views/detail/detail.vue'),
   
    
  },
    {
    path: '/register',
    name: 'register',
    component:() => import('../views/register/register.vue'),
   
    
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
